package server.main.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import server.main.service.DataDictionaryService;

import java.util.HashMap;
import java.util.Map;

/**
 * @auther MingHsZzz
 * @Date 2022/10/10  17:11
 * @project main
 * @description
 */


@RestController
@RequestMapping("/datadictionary")
public class DataDictionaryController {

   @Autowired
   DataDictionaryService dataDictionaryService;


   /**
    * 获取性别
    * @return
    */
   @GetMapping("/getgenders")
   public Map<String,Object> getGenders(){
      Map<String,Object> map = new HashMap<>();
      map.put("code",200);
      map.put("data",dataDictionaryService.getGenders());


      return map;
   }


   /**
    * 获取民族
    * @return
    */
   @GetMapping("/getnationalities")
   public Map<String,Object> getNationalities(){
      Map<String,Object> map = new HashMap<>();
      map.put("code",200);
      map.put("data",dataDictionaryService.getNationalities());


      return map;
   }









}
